package org.zjt.mock.demo.mock.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;

/**
 * Description:
 *
 * @author juntao.zhang
 * Date: 2018-06-21 下午4:28
 * @see
 */


@Slf4j
public  class UserValidator implements Validator {

    @Override
    public boolean supports(Class<?> clazz) {

        return Boolean.TRUE.booleanValue();
    }

    @Override
    public void validate(Object target, Errors errors) {

        Class<?> aClass = target.getClass();

        log.info("---------------------------------------");
//            errors.rejectValue(field, errorCode, errorArgs, violation.getMessage());
    }
}